package com.example.zhunongzonghe.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 
 * @TableName zn_farm_specification
 */
@TableName(value ="zn_farm_specification")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ZnFarmSpecification implements Serializable {

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 主键，农产品包装规格表
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 属于哪个农产品
     */
    @TableField(value = "zn_farm_id")
    private Integer znFarmId;

    /**
     * 规格名
     */
    @TableField(value = "zn_spec_title")
    private String znSpecTitle;

    /**
     * 计量单位，如斤、箱、包、件等
     */
    @TableField(value = "zn_spec_unit")
    private String znSpecUnit;

    /**
     * 价格
     */
    @TableField(value = "zn_spec_price")
    private BigDecimal znSpecPrice;

    /**
     * 库存
     */
    @TableField(value = "inventory")
    private Integer inventory;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;


}